# -*-conding:utf-8-*-

"""

 Created by feiwo at 2018/7/29
 
"""
from datetime import datetime

from sqlalchemy import Column, SmallInteger, DateTime, Integer
from flask_sqlalchemy import SQLAlchemy

__author__ = 'feiwo'

db = SQLAlchemy()


class Base(db.Model):
    __abstract__ = True
    id = Column(Integer, primary_key=True, autoincrement=True)
    status = Column(SmallInteger(), nullable=False, default=1, comment='1: 激活 0：软删除')
    createAt = Column(DateTime(), nullable=False, default=datetime.now())
    updateAt = Column(DateTime(), nullable=False, default=datetime.now(), onupdate=datetime.now())
